/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
 */
 
#include <sqlite3.h>
#include <stdio.h>
#include <Elementary.h>

#define LISTVIEW 0
#define ALBUM_ART 1
#define LYRICS 2

#define IDLE -1
#define PLAYING 1
#define PAUSE 0

void save_state(void);
void restore_state(void);
int add_albums(char *);
void add_songs(char *, char* , char*);
void update_album_list(Elm_Genlist_Item_Class *cl, Evas_Object *li);
void remove_album(char *album);
void add_default_playlist(void);
void populate_play_list(Evas_Object *list);
void populate_playlist_songs(Evas_Object *list);
void populate_main_list(Evas_Object *list);
void populate_create_play_list(Evas_Object *list);
int count_albums(void);
int get_song_pos(char *path);
void del_playlist(char *list);
void save_playlist(char *playlist, Evas_Object *li);
void begin_transaction(void);
void commit_transaction(void);
void add_songs_from_album(char *album, Evas_Object *list);
extern void gl_sel(void *data, Evas_Object *obj, void *event_info);
extern void song_select(void *data, Evas_Object *obj, void *event_info);
void first_run(void);

extern char cur_file[255];
extern int song_index, vol, no_songs;
extern Elm_Genlist_Item *song_list[10000];
extern Ecore_Timer *timer1;
extern int pos_time, view, seek, pos_time, play_state, song_dur, finger, priority;
extern Elm_Genlist_Item_Class itc_list, itc_album_list, itc_c_play_list, itc_dir_list, itc_play_list, itc_add_album_list;
extern Evas_Object *play_list, *list, *ic_playlist, *ic_albums, *add_page_win, *manage_playlist_page_win;
sqlite3 *songs;
char home_dir[255], intone_dir[255];
typedef struct {
	char path[255];
	int type;
} _dir;
extern _dir dir_gl_entry[255];
